home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / sound / algomusic / install < prev    next >
Text File  |  1996-11-01  |  11KB  |  283 lines

  1. ; AlgoMusic Install Utility
  2. ; (C) 1996 by Thomas Schürger
  3. ; REMEMBER THAT ALGOMUSIC IS >GIFTWARE<!!
  4.  
  5. ; $VER: AlgoMusicInstall 1.7 (1.11.96)
  6. ;
  7. ; Script will auto-detect 68020+
  8.  
  9. ; Do not allow Novice User (when running from Shell)
  10.  
  11. (if (= @user-level 0)
  12.     (set @user-level 1)
  13. )
  14.  
  15. ; Get AlgoMusic version of the version present in install directory
  16.  
  17. (set #algoverlong (getversion "AlgoMusic"))
  18.  
  19. (if #algoverlong
  20.   (
  21.     (set #algoversion (/ #algoverlong 65536 ))
  22.     (set #algorevision (- #algoverlong (* #algoversion 65536 )))
  23.   )
  24.  
  25.   (
  26.     (set #algoversion "x")
  27.     (set #algorevision "x")
  28.   )
  29. )
  30.  
  31. (set #versionstring (cat #algoversion "." #algorevision))
  32.  
  33. ; Set texts to language (locale)
  34. ; Set to German if available, English otherwise
  35.  
  36. (if (not (patmatch "68000|68010" (database "cpu")))
  37.    (
  38.    set #cputype "68020+"
  39.    )
  40.  
  41.    (
  42.    set #cputype "68000"
  43.    )
  44. )
  45.  
  46. (if (= @language "deutsch")
  47.   (
  48.    (set #installerversion  "Sie haben eine veraltete Version des Installers installiert.\n\nDie neue Version unterstützt u.a. neue Features. Sie ist z.B. im Aminet erhältlich.\n\nBitte installieren Sie diese demnächst!")
  49.    (set #welcometext       (cat "Willkommen zum Installationsprogramm für AlgoMusic V" #versionstring ", dem ultimativen Programm für algorithmische Musik auf Ihrem Amiga.\n\nEinfache und intuitive Installation ist garantiert."))
  50.    (set #wrongosversion    "Sie benötigen mindestens Amiga OS 2.0 (V36) für AlgoMusic.\n\nBitte unterstützen Sie den Amiga und rüsten Sie auf das jeweils neueste Betriebssystem auf.\n\nEs ist dringendst anzuraten und lohnt sich!")
  51.    (set #algomusicexists   "Sie haben im angegebenen Pfad AlgoMusic bereits installiert. Soll dieses Verzeichnis in \"AlgoMusic.old\" umbenannt werden und AlgoMusic ins angegebene Verzeichnis installiert werden oder möchten Sie die vorhandene Version überschreiben (dabei gehen auch alle Samples usw. verloren)?")
  52.    (set #existsrename      "Umbenennen")
  53.    (set #existsoverwrite   "Überschreiben")
  54.    (set #destinationprompt (cat "Wählen Sie das Verzeichnis, in das AlgoMusic " #cputype " installiert werden soll. Ein neues Verzeichnis namens \"AlgoMusic\" wird dort erstellt."))
  55.    (set #copyingtext       "Kopiere benötigte Dateien in das Verzeichnis\n\n\"%s\"")
  56.    (set #prefsrenamed      "Sie hatten bereits Voreinstellungen für AlgoMusic in Ihrem ENVARC: Verzeichnis. \"AlgoMusic.prefs\" wurde dort in \"AlgoMusic.prefs.old\" umbenannt.\n\nVergleichen Sie am besten nach durchgeführter Installation beide Files und sehen Sie nach, was Sie in die neuen Prefs übernehmen möchten.")
  57.    (set #seehistoryprompt  "Möchten Sie sich das History-File von AlgoMusic ansehen?")
  58.    (set #seehistoryhelp    "AlgoMusic hat bei jeder neuen Version eine Reihe von neuen Features und Bugfixes. Lesen Sie sich am besten durch, was bei dieser Version verbessert und ergänzt wurde.")
  59.    (set #addpathprompt     "Das AlgoMusic-Verzeichnis sollte in den Systempfad mit aufgenommen werden. Soll dies automatisch in der User-Startup für Sie erledigt werden oder wollen Sie es selber durchführen?")
  60.    (set #userstartup       "Die folgenden Zeilen werden an Ihre User-Startup angehängt:\n\n")
  61.    (set #userstartupauto   "Automatisch")
  62.    (set #userstartupmanu   "Selber")
  63.    (set #giftware          "Bitte denken Sie daran, daß AlgoMusic GIFTWARE ist.\n\nSie müssen bei Gefallen dem Autor ein kleines Geschenk schicken. Lesen Sie dazu auch im Guide nach!\n\n\n\nViel Spaß,\n\nThomas Schürger")
  64.    (set #delold            "AlgoMusic ist installiert. Wenn Sie von der neuen Version überzeugt sind, können Sie nach kurzer Zeit das Verzeichnis \"%s\" löschen.")
  65.   )
  66.  
  67.   ( 
  68.    (set #installerversion  "You've got an old version of the Installer installed.\n\nThe new version has lots of new features and improvements. It's available on Aminet, for example.\n\nPlease install it as soon as possible!")
  69.    (set #welcometext       (cat "Welcome to the installation utility for AlgoMusic V" #versionstring ", the ultimate program for algorithmic music on your Amiga.\n\nEasy and intuitive installation is guaranteed."))
  70.    (set #wrongosversion    "AlgoMusic requires at least Amiga OS 2.0 (V36).\n\nPlease support your beloved computer by installing the newest Amiga operating system available.\n\nIt's worth it for sure!")
  71.    (set #algomusicexists   "You've already got AlgoMusic installed in the path specified. Would you like to rename the existing directory to \"AlgoMusic.old\" and install the new version or would you like to overwrite the old version (all samples etc. will be lost)?")
  72.    (set #existsrename      "Rename")
  73.    (set #existsoverwrite   "Overwrite")
  74.    (set #destinationprompt "Select a destination for AlgoMusic. A new drawer called \"AlgoMusic\" will be created there.")
  75.    (set #copyingtext       "Copying required files to:\n\n\"%s\"")
  76.    (set #prefsrenamed      "You already had preferences for AlgoMusic in your ENVARC: directory. \"AlgoMusic.prefs\" has been renamed to \"AlgoMusic.prefs.old\".\n\nPlease compare both files and decide which of the old preferences you would like to transfer to the new prefs-file after the installation has been completed.")
  77.    (set #seehistoryprompt  "Would you like to see the history of AlgoMusic?")
  78.    (set #seehistoryhelp    "AlgoMusic has a lot of new features and bugfixes with each version. You may want to see what has been changed and improved in this version.")
  79.    (set #addpathprompt     "You should include the AlgoMusic-directory in your system path. Would you like this to be done automatically or would you like to do it by hand?")
  80.    (set #userstartup       "The following lines will be appended to your user-startup:\n\n")
  81.    (set #userstartupauto   "Automatically")
  82.    (set #userstartupmanu   "By hand")
  83.    (set #giftware          "Remember that AlgoMusic is GIFTWARE.\n\nYou are asked to send me a gift if you like this program. Read the guide for further information!\n\n\n\nHave fun!\n\nThomas Schürger")
  84.    (set #delold            "AlgoMusic is now installed. If you are convinced by the new version, you can delete the directory \"%s\" after a while.")
  85.   )
  86. )
  87.  
  88. ; Welcome the user
  89.  
  90. (welcome #welcometext)
  91.  
  92. ; Get Amiga OS version
  93.  
  94. (set #osversion (/ (getversion "exec.library" (resident)) 65536 ))
  95.  
  96. (if (< #osversion 36 )
  97.   (exit #wrongosversion (quiet))
  98. )
  99.  
  100. ; Remind user if having installed an old Installer
  101.  
  102. (if (= @installer-version "")
  103.   (message #installerversion)
  104. )
  105.  
  106. (complete 0)
  107.  
  108. ; Select appropriate destination directory
  109.  
  110. (set #destdir (askdir
  111.                  (prompt #destinationprompt)
  112.                  (default (expandpath (if (exists "AlgoMusic:" (noreq))
  113.                                            "AlgoMusic:/"
  114.                                       (if (exists "Music:" (noreq))
  115.                                            "Music:"
  116.                                       (if (exists "Sound:" (noreq))
  117.                                            "Sound:"
  118.                                       (if (exists "Work:Work/Music" (noreq))
  119.                                            "Work:Work/Music"
  120.                                       (if (exists "Work:Work" (noreq))
  121.                                            "Work:Work"
  122.                                       (if (exists "Work:" (noreq))
  123.                                            "Work:" "SYS:"
  124.                                       )))))))
  125.                  (newpath)
  126.                  (help @askdir-help)
  127.             )
  128.          )
  129. )
  130.  
  131. (set #fulldestdir (tackon #destdir "AlgoMusic"))
  132. (set #fullolddir  (tackon #destdir "AlgoMusic.old"))
  133. (set @default-dest #fulldestdir)
  134.  
  135. (complete 10)
  136.  
  137. (set renamed 0)
  138.  
  139. ; Check if AlgoMusic already exists in selected directory
  140.  
  141. (if (exists #fulldestdir)
  142.    (
  143.       (if (askbool
  144.              (prompt #algomusicexists)
  145.              (default 1)
  146.              (choices #existsrename #existsoverwrite)
  147.              (help @askbool-help)
  148.           )
  149.  
  150.           (
  151.              (run (cat "Delete " #fullolddir " ALL QUIET"))
  152.              (rename #fulldestdir #fullolddir)
  153.              (set #renamed 1)
  154.           )
  155.           (
  156.              (run (cat "Delete " #fulldestdir " ALL QUIET"))
  157.              (run (cat "Delete " #fullolddir " ALL QUIET"))
  158.           )
  159.        )
  160.     )
  161. )
  162.  
  163. (makedir #fulldestdir (infos))
  164.  
  165. (complete 20)
  166.  
  167. (working (#copyingtext #fulldestdir))
  168.  
  169. (copyfiles
  170.    (source "")
  171.    (dest #fulldestdir)   
  172.    (all)
  173.    (optional (nogauge))
  174. )
  175.  
  176. (complete 80)
  177.  
  178. ; Check if AlgoMusic preferences already exist
  179.  
  180. (if (exists "ENVARC:AlgoMusic.prefs"))
  181.    (
  182.    (delete "ENVARC:AlgoMusic.prefs.old")
  183.    (rename "ENVARC:AlgoMusic.prefs" "ENVARC:AlgoMusic.prefs.old")
  184.    (message #prefsrenamed)
  185.    )
  186.  
  187. (copyfiles
  188.    (source "AlgoMusic.prefs")
  189.    (dest "ENVARC:")
  190.    (nogauge)
  191. )
  192.  
  193. (if (exists "ENV:AlgoMusic.prefs"))
  194.    (
  195.    (delete "ENV:AlgoMusic.prefs.old")
  196.    (rename "ENV:AlgoMusic.prefs" "ENV:AlgoMusic.prefs.old")
  197.    )
  198.  
  199. (copyfiles
  200.    (source "AlgoMusic.prefs")
  201.    (dest "ENV:")
  202.    (nogauge)
  203. )
  204.  
  205. (delete (tackon #fulldestdir "Install"))
  206. (delete (tackon #fulldestdir "Install.info"))
  207. (delete (tackon #fulldestdir "AlgoMusic.prefs"))
  208.  
  209. (if (= #cputype "68020+")
  210.    (
  211.    (delete (tackon #fulldestdir "AlgoMusic"))
  212.    (rename (tackon #fulldestdir "AlgoMusic.020") (tackon #fulldestdir "AlgoMusic"))
  213.    )
  214.  
  215.    (
  216.    (delete (tackon #fulldestdir "AlgoMusic.020"))
  217.    )
  218. )
  219.  
  220. (set #uschanges (cat "Path \"" #Fulldestdir "\" ADD"))
  221.  
  222. (complete 85)
  223.  
  224. ; Ask if user wants to automatically set Path to AlgoMusic or not
  225.  
  226. (if (askbool
  227.        (prompt #addpathprompt)
  228.        (default 1)
  229.        (help @askbool-help)
  230.        (choices #userstartupauto #userstartupmanu)
  231.     )
  232.  
  233.     (
  234.        (startup "AlgoMusic"
  235.           (command #uschanges)
  236.           (prompt (cat #userstartup ";BEGIN AlgoMusic\n" #uschanges "\n;END AlgoMusic"))
  237.           (help @startup-help)
  238.        )
  239.     )
  240. )       
  241.  
  242. (complete 90)
  243.  
  244. (if #renamed
  245.     (message (#delold #fullolddir))
  246. )
  247.  
  248. (complete 95)
  249.  
  250. ; Ask if user wants to see the history guide of AlgoMusic
  251.  
  252. (if (OR (exists "C:AmigaGuide" (noreq)) (exists "SYS:System/Utilities/AmigaGuide" (noreq)))
  253.   (if (askbool
  254.          (default 1)
  255.          (prompt #seehistoryprompt)
  256.          (help #seehistoryhelp)
  257.       )
  258.       (Run "amigaguide AlgoMusic.guide DOC History")
  259.   )
  260. (if (OR (exists "C:MultiView" (noreq)) (exists "SYS:System/Utilities/Multiview" (noreq)))
  261.   (if (askbool
  262.          (default 1)
  263.          (prompt #seehistoryprompt)
  264.          (help #seehistoryhelp)
  265.       )
  266.       (Run "Multiview AlgoMusic.guide")
  267.   )
  268. (if (OR (exists "C:More" (noreq)) (exists "SYS:System/Utilities/More" (noreq)))
  269.   (if (askbool
  270.          (default 1)
  271.          (prompt #seehistoryprompt)
  272.          (help #seehistoryhelp)
  273.       )
  274.       (Run "More AlgoMusic.guide")
  275.   )
  276. )))
  277.  
  278. (complete 100)
  279.  
  280. ; Present the cute Giftware message
  281.  
  282. (message #giftware)
  283.